package com.example.waterfall.model;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * the info about the bitmap item
 * 
 * @author huangrongcai
 * 
 */
public class BitmapInfo implements Parcelable {
	
	public String id;
	/**
	 * 宽
	 */
	public int imageWidth = 100;
	/**
	 * 高
	 */
	public int imageHeight = 200;
	/**
	 * 图标资源地址
	 */
	public String icon;
	/**
	 * 大图资源地址
	 */
	public String picture;
	/**
	 * 最后一次更新时间，
	 */
	public String lastModified;
	/**
	 * 图片描述
	 */
	public String comment;
	/**
	 * 图片相关地理位置
	 */
	public String location;
	/**
	 * 作者
	 */
	public String author;
	/**
	 * 访问次数
	 */
	public String visitedCount;
	
	/**
	 * 赞的次数
	 */
	public int good;
	/**
	 * 标题
	 */
	private String title;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getPicture() {
		return picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	public String getLcation() {
		return location;
	}

	public void setLcation(String lcation) {
		this.location = lcation;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	// //////////////////////////////////
	// 对象序列化，根据需要的序列化添加，可以节性能。
	// ////////////////////////////////
	public static final Parcelable.Creator<BitmapInfo> CREATOR = new Creator<BitmapInfo>() {
		public BitmapInfo createFromParcel(Parcel source) {
			BitmapInfo info = new BitmapInfo();
			info.imageWidth = source.readInt();
			info.imageHeight = source.readInt();
			info.icon = source.readString();
			info.lastModified = source.readString();
			return info;
		}

		public BitmapInfo[] newArray(int size) {
			return new BitmapInfo[size];
		}
	};

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {

		dest.writeInt(imageWidth);
		dest.writeInt(imageHeight);
		dest.writeString(icon);
		dest.writeString(lastModified);

	}

}
